#include"ProcessBar.h"

void Process(int cur, double total){
  char buffer[Num];
  memset(buffer, 0, sizeof(buffer));
  char lable[] = "/|-\\";
  int length = strlen(lable);

  double Precent = (cur * 100 / total);
  int i = 0;
  for(i = 0; i < (int)(Precent); ++i){
    buffer[i] = STYLE;
  } 

  
  printf("[%-100s][%.2lf%%][%c]\r", buffer, Precent, lable[lable_move]);
  fflush(stdout);
  ++lable_move;
  lable_move %= length;
}
